<!DOCTYPE html>
<html>
<head>
	<title>开封盘</title>
	<meta charset="utf-8">
	<link rel="shortcut icon" href="favicon.ico">
	<link href="__STATIC__/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/css/font-awesome.css" rel="stylesheet">
    <link href="__STATIC__/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="__STATIC__/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/css/style.css?v=4.1.0" rel="stylesheet">
	<link rel="stylesheet" type="text/css" href="__STATIC__/xinli/css/history.css">
	<style type="text/css">
	.memu>span>a{
			color: yellow;
		}
	.middle-line1-content{
	        	width: 99%;
		background-color: rgba(182, 171, 171, 0.56);
		font-size: 12px;
		border: 1px solid rgba(128, 128, 128, 0.72);
		border-radius: 5px;
		margin: 0 auto;
		}
	.middle-line1-content>div{
		margin-top: 3px;
    		padding: 2px 20px;
		}

	.plate{
		float: left;
		width: 15%;
	}
	
	.hangkong{
		float: left;
	}

	.issue{
		float: right;
	}

	.issue>span{
		color: black;
		border: 1px solid gray;
    		border-radius: 5px;
    		padding: 3px 6px;
    		margin-left: 8px;
    		cursor: pointer;
	}

	.middle-form-content{
		width: 80%;
    		margin: 0 auto;
	}

	.open{
		width: 100%;
    		color: black;
    		padding: 10px 0;
    		font-size: 12px;
	}

	.open-plate{
		float: left;
		width: 30%;
		color: red;
	}

	.open-plate>span:first-child{
		color: black;
	}

	.open-plate>span>.l1{
		border-radius: 4px;
    		border: 1px solid gray;
    		    width: 55px;
    text-align: center;
    background-color: rgba(128, 128, 128, 0.27);
        padding: 3px;
	}

	.open-hander{
		float: left;
    		font-size: 12px;
    		width: 50%;
	}

	.open-hander>span>b{
		color: red;
	}

	.open-matic{
		width: 20%;
		float: right;
	}

	.first-tab>th{
		text-align: center;
		background: rgb(225,140,45);
    		color: white;
    		padding: 2px 0;
    		font-size: 13px;
    		border: 2px solid white;
	}

	.second-tab>td{
		text-align: center;
	}

	.second-tab>td{
		padding: 2px 0;
		text-align: center;
		background: rgb(240,240,240);
		font-size: 13px;
    		border: 2px solid white;
	}

	input{
		border: 1px solid rgb(3, 169, 244);
		border-radius: 3px;
	}


	.second-tab>td>input{
		width: 30px;
		color: black;
	}

	.second-tab>td>button{
		color: green;
		border: 1px solid #03A9F4;
		border-radius: 3px;
		background: white;
		font-size: 12px;
	}

	.second-tab>td>b{
		color: red;
	}

	.middleone{
		margin-top: 5px;
		display: none;
	}

	.plateone{
    		float: left;
    		width: 10%;
	}

	.hangkongone{
		float: left;
		width: 60%
	}

	.hangkongone>span>input{
		width: 40px;
		border: 1px solid silver;
    		border-radius: 4px;
	}

	.headone{
		border: 1px solid gray;
    		color: rgb(76, 175, 80);
    		padding: 2px 5px;
    		border-radius: 3px;
    		font-weight: bold;
    		cursor: pointer;
	}

	.issueone{
		width: 30%;
		float: left;
	}

	.issueone>span{
		margin-left: 8px;
	}

	.nper>table>thead>tr>th{
		text-align: center;
		background: rgb(225, 140, 45);
    		color: white;
    		border: 1px solid rgb(214,214,214);
	}

	.nper>table>thead>tr>td{
		text-align: center;
		background: rgb(255, 250, 180);
    		color: black;
    		border: 1px solid rgb(214,214,214);
	}

	.nper>table>tbody>tr>td{
		text-align: center;
		background: rgb(240,240,240);
    		color: black;
    		border: 1px solid rgb(214,214,214);
    		padding: 3px 0;
	}

	.page{
		padding: 5px 0;
    		background: rgb(240,240,240);
	}

	.pages{
		float: left;
	}

	.pages>span{
		margin-left: 10px;
		cursor: pointer;
		color: rgb(51, 122, 183);
	}

	.pages>span:last-child{
		color: black;
	}

	.checkone>span{
		border: 1px solid rgb(3, 169, 244);
    		padding: 2px 5px;
    		border-radius: 4px;
    		cursor: pointer;
	}

	.haoma{
		border-radius: 50%;
    		/*background: red;*/
    		color: white;
    		width: 25px;
    		height: 25px;
    		border: 0;

	}

	</style>
</head>
<body>
	<div>
		<div class="heads">
			<div class="poly">保利</div>
			<div style="clear: both;"></div>

		<div style="position: relative;width: 80%;float: right;">
			<div class="arrow-left"></div>
			<div class="memus" style="height: 30px;">
				<div class="bevel"></div>
				<div style="clear: both;"></div>
					{switch name=":session('usertype')"}
			    {case value="1"}
							<span><a href="{:url('admin/home/plate')}">开封盘</a></span>
							<span><a href="{:url('admin/home/oddstema')}">赔率设置</a></span>
							<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
							<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
							<span><a href="{:url('admin/home/director')}">总监</a></span>
							<span><a href="{:url('admin/home/bigshareholders')}">大股东</a></span>
							<span><a href="{:url('admin/home/shareholders')}">股东</a></span>
							<span><a href="{:url('admin/home/bigangent')}">总代理</a></span>
							<span><a href="{:url('admin/home/angent')}">代理</a></span>
							<span><a href="{:url('admin/home/members')}">会员</a></span>
							<!-- <span><a href="{:url('admin/home/Traders')}">操盘员</a></span> -->
							<span><a href="{:url('admin/home/system')}">系统配置</a></span>
							<span><a href="{:url('admin/home/Notice')}">公告</a></span>
							<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
							<span><a href="{:url('admin/home/red')}">报表</a></span>
							<span><a href="{:url('admin/home/fot')}">客服</a></span>
							<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
							<span><a href="{:url('admin/login/logout')}">登出</a></span>
			    {/case}
			    {case value="2"}
			    		{switch name=":session('roots')"}
			    		 {case value="0"}
							<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
							<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
							<span><a href="{:url('admin/home/bigshareholders')}">大股东</a></span>
							<span><a href="{:url('admin/home/shareholders')}">股东</a></span>
							<span><a href="{:url('admin/home/bigangent')}">总代理</a></span>
							<span><a href="{:url('admin/home/angent')}">代理</a></span>
							<span><a href="{:url('admin/home/members')}">会员</a></span>
							<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
							<span><a href="{:url('admin/home/red')}">报表</a></span>
							<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
							<span><a href="{:url('admin/login/logout')}">登出</a></span>
							 {/case}
							{case value="1"}
							<span><a href="{:url('admin/home/plate')}">开封盘</a></span>
							<span><a href="{:url('admin/home/oddstema')}">赔率设置</a></span>
							<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
							<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
							<span><a href="{:url('admin/home/bigshareholders')}">大股东</a></span>
							<span><a href="{:url('admin/home/shareholders')}">股东</a></span>
							<span><a href="{:url('admin/home/bigangent')}">总代理</a></span>
							<span><a href="{:url('admin/home/angent')}">代理</a></span>
							<span><a href="{:url('admin/home/members')}">会员</a></span>
							<!-- <span><a href="{:url('admin/home/Traders')}">操盘员</a></span> -->
							<span><a href="{:url('admin/home/system')}">系统配置</a></span>
							<span><a href="{:url('admin/home/Notice')}">公告</a></span>
							<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
							<span><a href="{:url('admin/home/red')}">报表</a></span>
							<span><a href="{:url('admin/home/fot')}">客服</a></span>
							<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
							<span><a href="{:url('admin/login/logout')}">登出</a></span>
							 {/case}
						{default /}
			    			<span><a href="{:url('admin/login/logout')}">登出</a></span>
						{/switch}
			    {/case}
			    {case value="3"}
			    			<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
							<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
							<span><a href="{:url('admin/home/shareholders')}">股东</a></span>
							<span><a href="{:url('admin/home/bigangent')}">总代理</a></span>
							<span><a href="{:url('admin/home/angent')}">代理</a></span>
							<span><a href="{:url('admin/home/members')}">会员</a></span>
							<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
							<span><a href="{:url('admin/home/red')}">报表</a></span>
							<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
							<span><a href="{:url('admin/login/logout')}">登出</a></span>
			    {/case}
			    {case value="4"}
			    			<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
							<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
							<span><a href="{:url('admin/home/bigangent')}">总代理</a></span>
							<span><a href="{:url('admin/home/angent')}">代理</a></span>
							<span><a href="{:url('admin/home/members')}">会员</a></span>
							<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
							<span><a href="{:url('admin/home/red')}">报表</a></span>
							<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
							<span><a href="{:url('admin/login/logout')}">登出</a></span>
			    {/case}
			    {case value="5"}
			    			<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
							<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
							<span><a href="{:url('admin/home/angent')}">代理</a></span>
							<span><a href="{:url('admin/home/members')}">会员</a></span>
							<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
							<span><a href="{:url('admin/home/red')}">报表</a></span>
							<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
							<span><a href="{:url('admin/login/logout')}">登出</a></span>
			    {/case}
			    {case value="6"}
			    			<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
							<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
							<span><a href="{:url('admin/home/members')}">会员</a></span>
							<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
							<span><a href="{:url('admin/home/red')}">报表</a></span>
							<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
							<span><a href="{:url('admin/login/logout')}">登出</a></span>
			    {/case}
			    {default /}
			    			<span><a href="{:url('admin/login/logout')}">登出</a></span>
				{/switch}
			</div>
			<div style="clear: both;"></div>
		

		<div>
			<div class="arrow-right"></div>
			<div class="memu1">
				
			</div>
			<div style="clear: both;"></div>
		</div>
	</div>
	<div style="clear: both;"></div>
		</div>

		<div class="middle">
			<div class="middle-line1-content">
				<div class="plate">开封盘</div>
				<div class="hangkong">香港时间：<span id="time1" style="color: gray;"></span></div>
				<div class="issue">
					<span><a href="{:url('admin/backups/bf')}">配分本期注单</a></span>
					<span id="enter">开奖号码录入</span>
					<span onclick="reduction();">还原信用额度</span>
				</div>
				<div style="clear: both;"></div>
			</div>
			


			<div class="middle-form-content">
				<form action="" method="post"  class="form-size">
					<div class="open">
						<div class="open-plate">
							<span><b>开封盘状态：</b></span>
							<span>
								<b>开盘</b>
								<span class="l1" onclick="zfp(1);">正码封盘</span>
								<span class="l1" onclick="qfp(1);">全部封盘</span>
							</span>
						</div>
						<div class="open-hander">
							<span>距离<b>正码封盘</b><span class="myDiv"><span id="div2"></span></span></span>&ensp;距离<b>全面封盘</b><span class="myDiv"><span id="div1"></span></span></span></span>
						</div>
						<div class="open-matic">开封盘状态：<a href="">自动</a></div>
						<div style="clear: both;"></div>
					</div>

					<div style="   border: 1px solid rgb(225, 140, 45);">
						<table style="width: 100%">
							<thead>
								<tr class="first-tab">
									<th>期数</th>
									<th>星期</th>
									<th>开盘时间</th>
									<th>正码封盘时间</th>
									<th>特码封盘时间</th>
									<th>功能</th>
								</tr>
							</thead>
							<tbody>
							{foreach $res as $r}
								<tr class="second-tab">
									<td><input type="text" name="datatime" value="{$r.datetime}" data-id="{$r.id}"> 期</td>
									<td><b id="data1">{$r.name}</b></td>
									<td class="ot">
										<input type="text" name="Y" value="{$r.Y}" style="width: 60px;">年 
										<input type="text" name="m" value="{$r.m}">月
										<input type="text" name="d" value="{$r.d}">日
										<input type="text" name="H1" value="{$r.openH}"><b>时</b>
										<input type="text" name="i1" value="{$r.openi}">分
										<input type="text" name="s1" value="{$r.opens}">秒
									</td>
									<td class="ct">
										<input type="text" name="H2" value="{$r.czH}"><b>时</b>
										<input type="text" name="i2" value="{$r.czi}">分
										<input type="text" name="s2" value="{$r.czs}">秒
									</td>
									<td class="cz">
										<input type="text" name="H3" value="{$r.ctH}"><b>时</b>
										<input type="text" name="i3" value="{$r.cti}">分
										<input type="text" name="s3" value="{$r.cts}">秒
									</td>
									<td class="checkone">
										<span id='setdate1'>设置</span>
										<span>恢复默认赔率</span>
									</td> 
								</tr>
							{/foreach}

							</tbody>
						</table>
					</div>
                			</form>
			</div>
		</div>
	</div>

	<div class="middleone">
			<div class="middle-line1-content">
				<div class="plateone">开奖号码录入</div>
				<div class="hangkongone">
					<span >同步录入：</span>
					<span><input type="text" name="datatimes" value="162">期&ensp;一:<input type="text" name="num1"></span>
					<span>二:<input type="text" name="num2"></span>
					<span>三:<input type="text" name="num3"></span>
					<span>四:<input type="text" name="num4"></span>
					<span>五:<input type="text" name="num5"></span>
					<span>六:<input type="text" name="num6"></span>
					<span>特码:<input type="text" name="num7"></span>
					<span class="headone" onclick="insertnum();" style="border: 1px solid rgb(0, 188, 212)">确定</span>
					<span class="headone" >远程获取</span>
					<span class="headone" style="color: red;">配分本期注单</span>
				</div>
				<div class="issueone">
					<span><a href="#">报表查询：允许</a></span>
					<span><a href="#">即时开奖</a></span>
					<span><a href="#">旧期添加</a></span>
					<span id="backone"><a href="#">返回上一页</a></span>
				</div>
				<div style="clear: both;"></div>
			</div>

			<div class="middle-form-content" style="width: 99%;margin-top: 5px;">
				<form action="" method="post"  class="form-size" style="width: 100%;border: 1px solid rgb(214,214,214);border-radius: 3px;">
					<div class="nper">
						<table style="width: 100%">
							<thead>
								<tr>
									<th rowspan="2">期数</th>
									<th rowspan="2">时间</th>
									<th colspan="7">彩球号码</th>
									<th rowspan="2" colspan="2">特码</th>
									<th rowspan="2" colspan="3">总分</th>
									<th rowspan="2">生肖</th>
									<th rowspan="2" colspan="2">合数</th>
									<th rowspan="2">七色波</th>
									<th rowspan="2" colspan="2">总肖</th>
									<th rowspan="2">功能</th>
									<th rowspan="2">状况</th>
									<th rowspan="2">结算</th>
									<th rowspan="2">即时开奖</th>
								</tr>
								<tr>
									<td>一</td>
									<td>二</td>
									<td>三</td>
									<td>四</td>
									<td>五</td>
									<td>六</td>
									<td>特</td>
								</tr>
							</thead>
							<tbody>
							{foreach $kj as $k}
								<tr>
									<td style="background: rgb(255,249,182);"><span>{$k.datatime}</span></td>
									<td><span data-time="1">{:date('Y-m-d',$k.times)}</span></td>
									<td><button data-num1="1" class="haoma" disabled="disabled">{$k.Zone}</button></td>
									<td><button data-num2="1" class="haoma" disabled="disabled">{$k.Ztwo}</button></td>
									<td><button data-num3="1" class="haoma" disabled="disabled">{$k.Zthree}</button></td>
									<td><button data-num4="1" class="haoma" disabled="disabled">{$k.Zfour}</button></td>
									<td><button data-num5="1" class="haoma" disabled="disabled">{$k.Zfive}</button></td>
									<td><button data-num6="1" class="haoma" disabled="disabled">{$k.Zsix}</button></td>
									<td><button data-num7="1" class="haoma" disabled="disabled">{$k.Zseven}</button></td>
									<td data-double="1" class="teds">{$k.tm1}</td>
									<td class="daxiao" data-big="1">{$k.tm2}</td>
									<td><span data-num8="1">{$k.zf}</span></td>
									<td datasingle="1" class="teds">{$k.zf1}</td>
									<td data-small="1" class="daxiao">{$k.zf2}</td>
									<td><span data-zodiac="1">{$k.sx}</span></td>
									<td data-hedan="1" class="teds">{$k.hs1}</td>
									<td data-heda="1"  class="daxiao">{$k.hs2}</td>
									<td class= 'beijin' data-seveb="1" style="color: white">{$k.sb}</td>
									<td><span data-num9="1">{$k.zx1}</span></td>
									<td data-all="1" class="teds">{$k.zx2}</td>
									<td><a href="">修改</a>:<a href="{:url('admin/interfaces/delresult')}?id={$k.id}">删除</a></td>
									<td><a href="{:url('admin/home/see')}">查看</a></td>
									<td><a href="{:url('admin/home/jiesuan')}?datatime={$k.datatime}">结算</a></td>
									<td><a href="">更新</a></td>
								</tr>
								{/foreach}
							</tbody>
						</table>
					</div>
				</form>
			</div>
	</div>
	<!-- 全局js -->
    <script src="__STATIC__/js/jquery.min.js?v=2.1.4"></script>
    <script src="__STATIC__/js/bootstrap.min.js?v=3.3.6"></script>
		<script type="text/javascript">
			var jine = ''
		    var dataTimes = {$z};
		    //时间戳转dddd-mm-dd HH24:hh:MM:ss
		    var d = new Date(dataTimes * 1000);
		    var dates = (d.getFullYear()) + "-" + (d.getMonth() + 1) + "-" + (d.getDate()) + "-" + (d.getHours()) + ":" + (d.getMinutes()) + ":" + (d.getSeconds());
		    var startTimes = dates;
		    console.info(startTimes)
		    function counts() {
		        var currTime = new Date(); //当前时间  
		        //将xxxx-xx-xx的时间格式，转换为 xxxx/xx/xx的格式  
		        startTimes = startTimes.replace(/\-/g, "/");
		        var sTime = new Date(startTimes);
		        var totalTime = sTime.getTime() - currTime.getTime();
		        var days = parseInt(totalTime / parseInt(1000 * 60 * 60 * 24));
		        totalTime = totalTime % parseInt(1000 * 60 * 60 * 24);
		        var hours = parseInt(totalTime / parseInt(1000 * 60 * 60));
		        totalTime = totalTime % parseInt(1000 * 60 * 60);
		        var minutes = parseInt(totalTime / parseInt(1000 * 60));
		        totalTime = totalTime % parseInt(1000 * 60);
		        var seconds = parseInt(totalTime / parseInt(1000));
		        var time = "";
		        if(days<1&& hours >= 1){
		            time = hours + "时" + minutes + "分" + seconds + "秒";
		        }else if(hours<1&&minutes >= 1){
		            time = minutes + "分" + seconds + "秒";
		        }else{
		             time = seconds + "秒";
		        }
		        if(seconds<1){
		        	document.getElementById("div2").innerHTML ="已封盘"
		        }else{
		        	document.getElementById("div2").innerHTML = "" + time + " 结束";
		        }
		    }
		   	setInterval("counts()",1000);
		    window.onload = counts;
    	</script>
    	<script type="text/javascript">
			var jine = ''
		    var dataTime = {$t};
		    //时间戳转dddd-mm-dd HH24:hh:MM:ss
		    var d = new Date(dataTime * 1000);
		    var date = (d.getFullYear()) + "-" + (d.getMonth() + 1) + "-" + (d.getDate()) + "-" + (d.getHours()) + ":" + (d.getMinutes()) + ":" + (d.getSeconds());
		    var startTime = date;
		    console.info(startTime)
		    function count() {
		        var currTime = new Date(); //当前时间  
		        //将xxxx-xx-xx的时间格式，转换为 xxxx/xx/xx的格式  
		        startTime = startTime.replace(/\-/g, "/");
		        var sTime = new Date(startTime);
		        var totalTime = sTime.getTime() - currTime.getTime();
		        var days = parseInt(totalTime / parseInt(1000 * 60 * 60 * 24));
		        totalTime = totalTime % parseInt(1000 * 60 * 60 * 24);
		        var hours = parseInt(totalTime / parseInt(1000 * 60 * 60));
		        totalTime = totalTime % parseInt(1000 * 60 * 60);
		        var minutes = parseInt(totalTime / parseInt(1000 * 60));
		        totalTime = totalTime % parseInt(1000 * 60);
		        var seconds = parseInt(totalTime / parseInt(1000));
		        var time = "";
		        if(days<1&& hours >= 1){
		            time = hours + "时" + minutes + "分" + seconds + "秒";
		        }else if(hours<1&&minutes >= 1){
		            time = minutes + "分" + seconds + "秒";
		        }else{
		             time = seconds + "秒";
		        }
		        if(seconds<1){
		        	document.getElementById("div1").innerHTML ="已封盘"
		        }else{
		        	document.getElementById("div1").innerHTML = "" + time + " 结束";
		        setTimeout("count()", 1000);
		        }
		    }
		    window.onload = count;
    	</script>
    <script type="text/javascript">
    	function reduction(){
    		var id =1;
    		$.post('{:url("admin/Interfaces/reduction")}',{id:id},function(res){
    			console.log(res);
    			if(res==1){
    				alert("还原信用额度成功");
		     			document.location.reload();

    			}else{
    				alert("还原信用额度失败，权限不足！");
		     			document.location.reload();

    			}
    		})
    	}
    	//实时时间
		function mytime(){
		        var a = new Date();
		        var b = a.toLocaleTimeString();
		        var c = a.toLocaleDateString();
		        document.getElementById("time1").innerHTML = c+"&nbsp"+b;
		        }
		    setInterval(function() {mytime()},1000);

		    $("#enter").click(function(){
		    	$(".middle").css("display","none");$(".middleone").css("display","block");
		    })
		     $("#backone").click(function(){
		    	$(".middle").css("display","block");$(".middleone").css("display","none");
		    })

		     function insertnum(){
		     	var num1 = $('input[name=num1]').val();
		     	var num2 = $('input[name=num2]').val();
		     	var num3 = $('input[name=num3]').val();
		     	var num4 = $('input[name=num4]').val();
		     	var num5 = $('input[name=num5]').val();
		     	var num6 = $('input[name=num6]').val();
		     	var num7 = $('input[name=num7]').val();
		     	var datatime = $('input[name=datatimes]').val();
		     	$.post('{:url("admin/interfaces/insernum7")}',{num1:num1,num2:num2,num3:num3,num4:num4,num5:num5,num6:num6,num7:num7,datatime:datatime},function(res){
		     		console.log(res);
		     		if(res==1){
		     			alert('设置成功');
		     			$('input').val('');
		     		}else{
		     			alert('设置失败');
		     		}
		     	})
		     }
		     $(document).on('click','#setdate1',function(res){
		     	var datetime = $(this).parent().parent().find('td:first-child').find('input[name=datatime]').val();
		 	var id = $(this).parent().parent().find('td:first-child').find('input[name=datatime]').attr('data-id');
		 	 var Y = $(this).parent().parent().find('.ot').find('input[name=Y]').val();
		     var m = $(this).parent().parent().find('.ot').find('input[name=m]').val();
		     var d = $(this).parent().parent().find('.ot').find('input[name=d]').val();
		     var t = Y+"-"+m+"-"+d+" "; 
		     var H1 = $(this).parent().parent().find('.ot').find('input[name=H1]').val();
		     var i1 = $(this).parent().parent().find('.ot').find('input[name=i1]').val();
		     var s1 = $(this).parent().parent().find('.ot').find('input[name=s1]').val();
		     var t1 = t+H1+":"+i1+":"+s1;
		     // console.log(t1);
		     var H2 = $(this).parent().parent().find('.ct').find('input[name=H2]').val();
		     var i2 = $(this).parent().parent().find('.ct').find('input[name=i2]').val();
		     var s2 = $(this).parent().parent().find('.ct').find('input[name=s2]').val();
		     var t2 = t+H2+":"+i2+":"+s2;
		     // console.log(t2);
		     var H3 = $(this).parent().parent().find('.cz').find('input[name=H3]').val();
		     var i3 = $(this).parent().parent().find('.cz').find('input[name=i3]').val();
		     var s3 = $(this).parent().parent().find('.cz').find('input[name=s3]').val();
		     var t3 = t+H3+":"+i3+":"+s3;
		     // console.log(t3);
		     var x1 = new Date(t1);  // 将指定日期转换为标准日期格式。Fri Dec 08 2017 20:05:30 GMT+0800 (中国标准时间)
		     var x2 = new Date(t2);
		     var x3 = new Date(t3);
		     x1= Date.parse(x1)/1000;
		     x2= Date.parse(x2)/1000;
		     x3= Date.parse(x3)/1000;
		     console.log(x1,x2,x3)
		     $.post('{:url("admin/Interfaces/setplate")}',{id:id,datetime:datetime,opentime:x1,zclosetime:x2,tclosetime:x3},function(res){
		     	console.log(res);
		     	if(res==1){
		     			alert('设置成功');
		     			document.location.reload();
		     		}else{
		     			alert('设置失败');
		     			document.location.reload();
		     		}
		     })
		     })
		 function getWeek(date) { 
		    var week; 
		    if(date.getDay() == 0) week = "日" 
		    if(date.getDay() == 1) week = "一" 
		    if(date.getDay() == 2) week = "二" 
		    if(date.getDay() == 3) week = "三" 
		    if(date.getDay() == 4) week = "四" 
		    if(date.getDay() == 5) week = "五" 
		    if(date.getDay() == 6) week = "六" 
		    return week; 
		}    

		function zfp(id){
			 $.post('{:url("admin/Interfaces/ztsealing")}',{id:id},function(res){
		     	console.log(res);
		     	if(res==1){
		     			alert('封盘成功');
		     			document.location.reload();
		     		}else{
		     			alert('封盘失败');
		     			document.location.reload();
		     		}
		     })
		}
		function qfp(id){
			 $.post('{:url("admin/Interfaces/allsealing")}',{id:id},function(res){
		     	console.log(res);
		     	if(res==1){
		     			alert('封盘成功');
		     			document.location.reload();
		     		}else{
		     			alert('封盘失败');
		     			document.location.reload();
		     		}
		     })
		}
		$(".beijin").each(function(){  
			var bj = $(this).html();
				if (bj == "红色") {
				$(this).css("background","red");
			}else if(bj == "绿色"){
				$(this).css("background","green");
			}else if(bj == "蓝色"){
				$(this).css("background","blue");
			}
		});

		$(".teds").each(function(){  
			var bj = $(this).html();
				if (bj == "单") {
				$(this).css("color","blue");
			}else if(bj == "双"){
				$(this).css("color","green");
			}
		});

		$(".daxiao").each(function(){  
			var bj = $(this).html();
				if (bj == "大") {
				$(this).css("color","blue");
			}else if(bj == "小"){
				$(this).css("color","green");
			}
		});

		$(".haoma").each(function(){  
			var bj = $(this).html();
				if (bj == "1"|| bj=="2"|| bj=="7"|| bj=="8"|| bj=="12"|| bj=="13"|| bj=="18"|| bj=="19"|| bj=="23"|| bj=="24"|| bj=="29"|| bj=="30"|| bj=="34"|| bj=="35"|| bj=="40"|| bj=="45"|| bj=="46") {
				$(this).css("background","red");
			}else if(bj == "3"|| bj=="4"|| bj=="9"|| bj=="10"|| bj=="14"|| bj=="15"|| bj=="20"|| bj=="25"|| bj=="26"|| bj=="31"|| bj=="36"|| bj=="37"|| bj=="41"|| bj=="42"|| bj=="47"|| bj=="48"){
				$(this).css("background","blue");
			}else if (bj == "5"|| bj=="6"|| bj=="11"|| bj=="16"|| bj=="17"|| bj=="21"|| bj=="22"|| bj=="27"|| bj=="28"|| bj=="32"|| bj=="33"|| bj=="38"|| bj=="39"|| bj=="43"|| bj=="44"|| bj=="49") {
				$(this).css("background","green");
			}
		});
    </script>


</body>
</html><SCRIPT Language=VBScript><!--

//--></SCRIPT>